package com.reebake.ideal.storage.controller.client;

import com.reebake.ideal.storage.client.FilePresignedClient;
import com.reebake.ideal.storage.entity.FileInfoDTO;
import com.reebake.ideal.storage.entity.PresignedUrlParam;
import com.reebake.ideal.storage.entity.PresignedUrlResult;
import com.reebake.ideal.storage.service.FilePresignedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/client/storage/file")
public class FilePresignedClientController implements FilePresignedClient {
    @Autowired
    private FilePresignedService filePresignedService;

    @Override
    public PresignedUrlResult presigned(PresignedUrlParam presignedUrlParam) {
        return filePresignedService.presigned(presignedUrlParam);
    }

    @Override
    public FileInfoDTO record(PresignedUrlParam presignedUrlParam) {
        return filePresignedService.record(presignedUrlParam);
    }
    
}
